#ifndef _MMAN_H
#define __MMAN_H

#define PROT_READ	0x1
#define PROT_WRITE	0x2
#define PROT_EXEC	0x4
#define PROT_NONE	0x0
#define PROT_GROWSDOWN	0x01000000 /* mprotect only */
#define PROT_GROWSUP	0x02000000 /* mprotect only */

#define MAP_SHARED	0x01	/* share changes */
#define MAP_PRIVATE	0x02	/* changes are private */
#define MAP_TYPE	0x0f	/* mask for type of mapping */

#define MAP_FIXED	0x10	/* interpret addr exactly */
#define MAP_FILE	0
#define MAP_ANONYMOUS	0x20	/* don't use a file */
#define MAP_ANON	MAP_ANONYMOUS

/* flags to `msync' */
#define MS_ASYNC	1	/* sync memory asynchronously */
#define MS_SYNC		4	/* synchronous memory sync */
#define MS_INVALIDATE	2	/* invalidate the caches */

#define MAP_FAILED	((void *)-1)

void * mmap(
	void * start, size_t length, int prot, int flags, int fd, off_t offset
	);
int munmap(void * start, size_t length);

#endif
